<%@ page language="java" contentType="text/html; charset=utf-8"%>

<html style="height:100%;overflow:hidden;">
	<head>
		<title>
		</title>
	</head>
	<%
		String tabId = request.getParameter("tabId");
		if(tabId!=null)
			tabId = java.net.URLDecoder.decode(tabId,"UTF-8");  
		
		String tabName = request.getParameter("tabName");
		if(tabName!=null)
			tabName = java.net.URLDecoder.decode(tabName,"UTF-8");  
		
		String url = request.getParameter("url");
		if(url!=null)
			url = java.net.URLDecoder.decode(url,"UTF-8");  
			
		String panelId = request.getParameter("panelId");
		String iframe_height = request.getParameter("iframe_height");
			
		String method = request.getParameter("method");
		if(method!=null)
			method = java.net.URLDecoder.decode(method,"UTF-8"); 
			
	 %>
<script type="text/javascript">

	function addTab(){
		var tabId = '';
		var tabName = '';
		var url = '';
		
		tabId = '<%=tabId%>';
		tabName = '<%=tabName%>';
		url = '<%=url%>';
		
		top.addTab(tabId, tabName, url);
	}
	function removeTab(){
		var tabId = '';
		tabId = '<%=tabId%>';
		
		top.removeTab(tabId);
	}
	function refreshPanel(){
		var tabId = '';
		tabId = '<%=tabId%>';
		top.refreshPanel(tabId);
	}
	function autoHeight(){
		var panelId = '<%=panelId%>';
		var iframe_height = '<%=iframe_height%>';
		if(iframe_height!='0'){
			top.autoHeight(panelId,iframe_height);
		}
	}
	
	var method ='<%=method%>';
	
	if(method=='addTab'){
		addTab();
	}else if(method=='removeTab'){
		removeTab();
	}else if(method=='refreshPanel'){
		refreshPanel();
	}else if(method=='autoHeight'){
		autoHeight();
	}
</script>
</html>